<?php 
require 'Model.php';
class CommentModel extends Model{
	function __Construct(){
		parent::__Construct();
		$this->mod='comments';
	}
	function getList()
	{
		$sql="select cid,comment,cdate,uname,videoname from comments join videos on videos.vid=comments.vid join users on users.uid=comments.uid";
		//$sql="select * from {$this->mod}";
		$data=$this->conn->query($sql);
		return $data;
	}
	function delete3($id)
	{
		$sql = "delete from comments where cid=".$id;
		$result = $this->conn->query($sql);
		return $result;
	}
}


?>